/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package basicas;

import java.io.IOException;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.Sprite;

/**
 *
 * @author pglj
 */
public class Lata {

    private Sprite lata;
    private boolean temComida;
    private int pX;
    private int pY;
    private int delay = 50;
    private int[] lataSeq = {0, 1};

    public Lata(int pX, int pY) {

        this.temComida = true;
        this.pX = pX;
        this.pY = pY;
        Image lataComida = null;

        try {
            lataComida = Image.createImage("/lata3.png");
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        lata = new Sprite(lataComida, 30, 47);
        lata.setRefPixelPosition(15, 24);
        lata.setFrameSequence(lataSeq);
        this.lata.setVisible(true);
        this.lata.setPosition(pX, pY);

    }

    public int getDelay() {
        return delay;
    }

    public void setDelay(int delay) {
        this.delay = delay;
    }

    public int[] getLataSeq() {
        return lataSeq;
    }

    public void setLataSeq(int[] lataSeq) {
        this.lataSeq = lataSeq;
    }




    public int getpX() {
        return pX;
    }

    public void setpX(int pX) {
        this.pX = pX;
    }

    public int getpY() {
        return pY;
    }

    public void setpY(int pY) {
        this.pY = pY;
    }

    public Sprite getLata() {
        return lata;
    }

    public void setLata(Sprite lata) {
        this.lata = lata;
    }

    public boolean isTemComida() {
        return temComida;
    }

    public void setTemComida(boolean temComida) {
        this.temComida = temComida;
    }
}
